import requests


class Notification:
    def __init__(self):
        self.headers = {'Content-Type':'application/json'}
        self.url = 'https://open.feishu.cn/open-apis/bot/v2/hook/b40b318b-1bef-44f4-b4d5-598932cc5972'

    def send_msg(self,text):
        data = {
            "msg_type": "text",
            "content": {
                "text": text
            }
        }
        print(type( data))
        return requests.post(url=self.url,headers=self.headers,json=data)


if __name__ == '__main__':
    notification = Notification()
    print(notification.send_msg('test mag'))